export default [
  { path: '/login', component: '@/pages/login', title: '登录' },
  {
    path: '/',
    // 公用模板
    component: '@/Layouts/index',
    // routes属性,配置子路由,
    routes: [
      { path: '/', redirect: '/home' },
      { path: '/home', component: '@/pages/index', title: '首页' },
      // redirect重定向, exact属性为严格匹配
      { path: '/list', redirect: '/user/one', exact: true },
      {
        path: '/user', routes: [
          { path: '/user/one', component: '@/pages/User/UserOne', title: '用户页1', routes: [] },
          // wrappers属性,配置路由的高阶组件封装。比如，可以用于路由级别的权限校验：
          { path: '/user/two', component: '@/pages/User/UserTwo', title: '用户页2', wrappers: ['@/pages/User/UserWrapper'] },
          // 必须带参数才可以
          { path: '/user/three/:id', component: '@/pages/User/UserThree', title: '用户页3' },
          // 默认子路由
          { path: '/user', redirect: '/user/one' },
          // 404
          { path: '*', component: '@/pages/404' }
        ]
      },
      { path: '/dva', component: '@/pages/Dva/index', title: 'dva' },
      // 404
      { path: '*', component: '@/pages/404' }
    ]
  }
]